<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-04 11:15:15
 * @LastEditTime: 2021-12-06 09:32:49
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/subpackage/shop/pages/list/index.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <view class="my-shop box-gap">
    <shop-card v-for="(shop,i) in shopList" :key="i" :shop="shop"></shop-card>
    <a-empty v-if="shopList.length === 0" :src="'empty/order.png'|prefixOssUrl" :tips="['暂无店铺']"></a-empty>
    <a-logo type="text"></a-logo>
  </view>
</template>

<script>
import ShopCard from '../@fragment/shop-card'
import { model } from '@/model';

const { Member } = model.collection;

export default {
  components: {
    ShopCard
  },
  data () {
    return {
      shopList: []
    }
  },
  onLoad () {
    this.init();
  },
  methods: {
    init () {
      Member.sendApi('shopList', {
        params: {},
        data: {}
      }).then(res => {
        const {
          status,
          data
        } = res;
        if (status) {
          this.shopList = data
        }
      });
    }
  }
}
</script>

<style lang="less">
.my-shop {
  background: #f7f7f7;
  min-height: 100vh;
}
</style>